<%@ page import="java.sql.*" %>
<%@ page contentType="text/html" pageEncoding="UTF-8"%>
<html>
  <head>
    
    <title>处理客户删除数据</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
<body>
    <% 
        String clientName=new String(request.getParameter("clientName")
            .getBytes("ISO-8859-1"),"UTF-8");
        Connection con=null;
        Statement stmt=null;
        try{
            Class.forName("com.mysql.jdbc.Driver");
            String url="jdbc:mysql://localhost:3306/eims?useUnicode=true&characterEncoding=gbk";
            con=DriverManager.getConnection(url,"root","123456");
            stmt=con.createStatement();
            String sql="delete from client where clientName='"
                    +clientName+"'";
                stmt.executeUpdate(sql);
                response.sendRedirect("../clientManage/lookClient.jsp");
            }
            catch(Exception e){
                e.printStackTrace();
            }
            finally{
                stmt.close();
                con.close();
            }
        
    %>
</body>
</html>